// +---------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]
// +---------------------------------------------------------------------
// | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
// +---------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权
// +---------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +---------------------------------------------------------------------

import LayoutMain from '@/layout';
import setting from '@/setting';
let routePre = setting.routePre;

const meta = {
  auth: true,
};

const pre = 'reporting_';

export default {
  path: routePre + '/reporting',
  name: 'reporting',
  header: 'reporting',
  redirect: {
    name: `${pre}index`,
  },
  meta,
  component: LayoutMain,
  children: [
    {
      path: 'list',
      name: `${pre}list`,
      meta: {
        auth: ['admin-reporting-reporting-index'],
        title: '报表列表',
      },
      component: () => import('@/pages/reporting/index'),
    },
    {
      path: 'list/add_reporting/:id?',
      name: `${pre}addReporting`,
      meta: {
        auth: ['admin-reporting-addReporting'],
        title: '添加报表',
        activeMenu: routePre + '/reporting/list',
      },
      component: () => import('@/pages/reporting/addReporting'),
    },
    {
      path: 'equipmentList',
      name: `${pre}equipmentList`,
      meta: {
        auth: ['admin-reporting-equipmentList'],
        title: '装备列表'
      },
      component: () => import('@/pages/reporting/equipment/index'),
    },
    {
      path: 'add_equipment/:id?',
      name: `${pre}addEquipment`,
      meta: {
        auth: ['admin-reporting-addEquipment'],
        title: '添加装备',
        activeMenu: routePre + '/reporting/equipmentList',
      },
      component: () => import('@/pages/reporting/equipment/addEquipment'),
    },
    {
      path: 'carList',
      name: `${pre}carList`,
      meta: {
        auth: ['admin-reporting-carList'],
        title: '车辆列表'
      },
      component: () => import('@/pages/reporting/car/index'),
    },
    {
      path: 'add_car/:id?',
      name: `${pre}addCar`,
      meta: {
        auth: ['admin-reporting-addCar'],
        title: '添加车辆',
        activeMenu: routePre + '/reporting/carList',
      },
      component: () => import('@/pages/reporting/car/addCar'),
    },
  ],
};
